<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
	    <meta name="apple-mobile-web-app-capable" content="yes" />
	    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
	    <meta name="format-detection" content="telephone=no" />
	    <meta http-equiv="Cache-Control" content="must-revalidate,no-cache">
	    <meta http-equiv="x-dns-prefetch-control" content="on" />
	    <meta name="version" content="20170614">
		<title>写评论</title>
		<link rel="stylesheet" type="text/css" href="css/reset.css"/>
		<script src="js/initRem.js"></script>
		<link rel="stylesheet" href="css/bootstrap.min.css">  
		<script src="js/jquery-2.1.4.min.js"></script>
		<script src="js/bootstrap.min.js"></script>
		<link rel="stylesheet" type="text/css" href="css/style.css"/>
		
	</head>

	<body class="w-eval">
		<div class="evalAll">
			<textarea name="eval" rows="" cols="" id="evaluate" placeholder="写点评价吧，对其他小朋友有很大帮助" maxlength="140"></textarea>
			<span class="words">
				还能输入<span>140</span>个字
			</span>
			<button class="">提交</button>
		</div>
		
		
	</body>
	<script type="text/javascript">
		var a = 0;
		document.getElementById("evaluate").oninput = function(){
			var word = 140;
			word = 140 - $("#evaluate").val().length;
			$(".evalAll .words span").text(word);
			if(a > $("#evaluate").val().length){
				console.log('输入减少');
			}else{
				console.log('输入增加');
			}
			a = $("#evaluate").val().length;

		}
	</script>
</html>